package main

import "fmt"

type Profile struct {
	name   string
	age    int
	gender string
	mother *Profile // 指针
	father *Profile // 指针
}

func main()  {
	 //第一种方式
	//xm := Profile{
	//	name: "小明",
	//	age: 18,
	//	gender: "male",
	//}

	//第二种方式
	//xm := new(Profile)
	//xm.name = "小明"
	//xm.age = 18
	//xm.gender = "male"

	//第三种方式
	var xm *Profile = &Profile{}
	xm.name = "小明"
	xm.age = 18
	xm.gender = "male"
	fmt.Println(xm)
}
